package edu.bailie.springmvc.service;

import edu.bailie.springmvc.dao.StudentDao;
import edu.bailie.springmvc.dao.StudentDaoImpl;
import edu.bailie.springmvc.pojo.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


@Service("studentServiceImpl")
public class StudentServiceImpl implements StudentService{

//	@Resource(name = "studentDaoImpl")

	@Autowired
//	@Qualifier("studentDaoImpl")
	private StudentDao studentDao;

	public StudentServiceImpl(StudentDao studentDao) {
		this.studentDao = studentDao;
	}

	@Override
	public void showStudentInfo(Student student) {
		System.out.println(studentDao.StudentInfo(student));
	}
}
